 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKResourcetag/ResourcetagModel.h>

@implementation ResourcetagTagFilter
-(id) initWithKey:(NSString*) key
      values:(NSArray<NSString*>*)values
      operatorValue:(NSString*)operatorValue { 
     self.key = key;               
     self.values = values;               
     self.operatorValue = operatorValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    if([self operatorValue])
    {
        [result setValue:[self operatorValue] forKey:@"operator"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.values = [dictionary objectForKey:@"values"];
    self.operatorValue = [dictionary objectForKey:@"operator"];
    return self;
}
 @end
@implementation ResetTagResourcesInfo
-(id) initWithResourceId:(NSString*) resourceId
      status:(NSNumber*)status
      msg:(NSString*)msg { 
     self.resourceId = resourceId;               
     self.status = status;               
     self.msg = msg;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self msg])
    {
        [result setValue:[self msg] forKey:@"msg"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.status = [dictionary objectForKey:@"status"];
    self.msg = [dictionary objectForKey:@"msg"];
    return self;
}
 @end
@implementation ResourcesMap
-(id) initWithServiceCode:(NSString*) serviceCode
      resourceId:(NSArray<NSString*>*)resourceId { 
     self.serviceCode = serviceCode;               
     self.resourceId = resourceId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    return self;
}
 @end
@implementation Tag
-(id) initWithKey:(NSString*) key
      value:(NSString*)value { 
     self.key = key;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation TagsResourcesInfo
-(id) initWithTagKey:(NSString*) tagKey
      tagValue:(NSString*)tagValue
      vmResourceCount:(NSNumber*)vmResourceCount
      diskResourceCount:(NSNumber*)diskResourceCount
      sqlServerResourceCount:(NSNumber*)sqlServerResourceCount
      mongodbResourceCount:(NSNumber*)mongodbResourceCount
      ipResourceCount:(NSNumber*)ipResourceCount
      esResourceCount:(NSNumber*)esResourceCount
      jcqResourceCount:(NSNumber*)jcqResourceCount
      drdsResourceCount:(NSNumber*)drdsResourceCount
      memcachedResourceCount:(NSNumber*)memcachedResourceCount
      redisResourceCount:(NSNumber*)redisResourceCount
      databaseResourceCount:(NSNumber*)databaseResourceCount
      dbRoResourceCount:(NSNumber*)dbRoResourceCount
      perconaResourceCount:(NSNumber*)perconaResourceCount
      mariadbResourceCount:(NSNumber*)mariadbResourceCount
      mariadbRoResourceCount:(NSNumber*)mariadbRoResourceCount
      pgResourceCount:(NSNumber*)pgResourceCount
      cdnResourceCount:(NSNumber*)cdnResourceCount
      nativecontainerResourceCount:(NSNumber*)nativecontainerResourceCount
      podResourceCount:(NSNumber*)podResourceCount
      jqsResourceCount:(NSNumber*)jqsResourceCount
      zfsResourceCount:(NSNumber*)zfsResourceCount
      kubernetesNodegroupResourceCount:(NSNumber*)kubernetesNodegroupResourceCount { 
     self.tagKey = tagKey;               
     self.tagValue = tagValue;               
     self.vmResourceCount = vmResourceCount;               
     self.diskResourceCount = diskResourceCount;               
     self.sqlServerResourceCount = sqlServerResourceCount;               
     self.mongodbResourceCount = mongodbResourceCount;               
     self.ipResourceCount = ipResourceCount;               
     self.esResourceCount = esResourceCount;               
     self.jcqResourceCount = jcqResourceCount;               
     self.drdsResourceCount = drdsResourceCount;               
     self.memcachedResourceCount = memcachedResourceCount;               
     self.redisResourceCount = redisResourceCount;               
     self.databaseResourceCount = databaseResourceCount;               
     self.dbRoResourceCount = dbRoResourceCount;               
     self.perconaResourceCount = perconaResourceCount;               
     self.mariadbResourceCount = mariadbResourceCount;               
     self.mariadbRoResourceCount = mariadbRoResourceCount;               
     self.pgResourceCount = pgResourceCount;               
     self.cdnResourceCount = cdnResourceCount;               
     self.nativecontainerResourceCount = nativecontainerResourceCount;               
     self.podResourceCount = podResourceCount;               
     self.jqsResourceCount = jqsResourceCount;               
     self.zfsResourceCount = zfsResourceCount;               
     self.kubernetesNodegroupResourceCount = kubernetesNodegroupResourceCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tagKey])
    {
        [result setValue:[self tagKey] forKey:@"tagKey"];
    }
    if([self tagValue])
    {
        [result setValue:[self tagValue] forKey:@"tagValue"];
    }
    if([self vmResourceCount])
    {
        [result setValue:[self vmResourceCount] forKey:@"vmResourceCount"];
    }
    if([self diskResourceCount])
    {
        [result setValue:[self diskResourceCount] forKey:@"diskResourceCount"];
    }
    if([self sqlServerResourceCount])
    {
        [result setValue:[self sqlServerResourceCount] forKey:@"sqlServerResourceCount"];
    }
    if([self mongodbResourceCount])
    {
        [result setValue:[self mongodbResourceCount] forKey:@"mongodbResourceCount"];
    }
    if([self ipResourceCount])
    {
        [result setValue:[self ipResourceCount] forKey:@"ipResourceCount"];
    }
    if([self esResourceCount])
    {
        [result setValue:[self esResourceCount] forKey:@"esResourceCount"];
    }
    if([self jcqResourceCount])
    {
        [result setValue:[self jcqResourceCount] forKey:@"jcqResourceCount"];
    }
    if([self drdsResourceCount])
    {
        [result setValue:[self drdsResourceCount] forKey:@"drdsResourceCount"];
    }
    if([self memcachedResourceCount])
    {
        [result setValue:[self memcachedResourceCount] forKey:@"memcachedResourceCount"];
    }
    if([self redisResourceCount])
    {
        [result setValue:[self redisResourceCount] forKey:@"redisResourceCount"];
    }
    if([self databaseResourceCount])
    {
        [result setValue:[self databaseResourceCount] forKey:@"databaseResourceCount"];
    }
    if([self dbRoResourceCount])
    {
        [result setValue:[self dbRoResourceCount] forKey:@"dbRoResourceCount"];
    }
    if([self perconaResourceCount])
    {
        [result setValue:[self perconaResourceCount] forKey:@"perconaResourceCount"];
    }
    if([self mariadbResourceCount])
    {
        [result setValue:[self mariadbResourceCount] forKey:@"mariadbResourceCount"];
    }
    if([self mariadbRoResourceCount])
    {
        [result setValue:[self mariadbRoResourceCount] forKey:@"mariadbRoResourceCount"];
    }
    if([self pgResourceCount])
    {
        [result setValue:[self pgResourceCount] forKey:@"pgResourceCount"];
    }
    if([self cdnResourceCount])
    {
        [result setValue:[self cdnResourceCount] forKey:@"cdnResourceCount"];
    }
    if([self nativecontainerResourceCount])
    {
        [result setValue:[self nativecontainerResourceCount] forKey:@"nativecontainerResourceCount"];
    }
    if([self podResourceCount])
    {
        [result setValue:[self podResourceCount] forKey:@"podResourceCount"];
    }
    if([self jqsResourceCount])
    {
        [result setValue:[self jqsResourceCount] forKey:@"jqsResourceCount"];
    }
    if([self zfsResourceCount])
    {
        [result setValue:[self zfsResourceCount] forKey:@"zfsResourceCount"];
    }
    if([self kubernetesNodegroupResourceCount])
    {
        [result setValue:[self kubernetesNodegroupResourceCount] forKey:@"kubernetesNodegroupResourceCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagKey = [dictionary objectForKey:@"tagKey"];
    self.tagValue = [dictionary objectForKey:@"tagValue"];
    self.vmResourceCount = [dictionary objectForKey:@"vmResourceCount"];
    self.diskResourceCount = [dictionary objectForKey:@"diskResourceCount"];
    self.sqlServerResourceCount = [dictionary objectForKey:@"sqlServerResourceCount"];
    self.mongodbResourceCount = [dictionary objectForKey:@"mongodbResourceCount"];
    self.ipResourceCount = [dictionary objectForKey:@"ipResourceCount"];
    self.esResourceCount = [dictionary objectForKey:@"esResourceCount"];
    self.jcqResourceCount = [dictionary objectForKey:@"jcqResourceCount"];
    self.drdsResourceCount = [dictionary objectForKey:@"drdsResourceCount"];
    self.memcachedResourceCount = [dictionary objectForKey:@"memcachedResourceCount"];
    self.redisResourceCount = [dictionary objectForKey:@"redisResourceCount"];
    self.databaseResourceCount = [dictionary objectForKey:@"databaseResourceCount"];
    self.dbRoResourceCount = [dictionary objectForKey:@"dbRoResourceCount"];
    self.perconaResourceCount = [dictionary objectForKey:@"perconaResourceCount"];
    self.mariadbResourceCount = [dictionary objectForKey:@"mariadbResourceCount"];
    self.mariadbRoResourceCount = [dictionary objectForKey:@"mariadbRoResourceCount"];
    self.pgResourceCount = [dictionary objectForKey:@"pgResourceCount"];
    self.cdnResourceCount = [dictionary objectForKey:@"cdnResourceCount"];
    self.nativecontainerResourceCount = [dictionary objectForKey:@"nativecontainerResourceCount"];
    self.podResourceCount = [dictionary objectForKey:@"podResourceCount"];
    self.jqsResourceCount = [dictionary objectForKey:@"jqsResourceCount"];
    self.zfsResourceCount = [dictionary objectForKey:@"zfsResourceCount"];
    self.kubernetesNodegroupResourceCount = [dictionary objectForKey:@"kubernetesNodegroupResourceCount"];
    return self;
}
 @end
@implementation FailedResourcesMap
-(id) initWithResourceId:(NSString*) resourceId
      msg:(NSString*)msg { 
     self.resourceId = resourceId;               
     self.msg = msg;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self msg])
    {
        [result setValue:[self msg] forKey:@"msg"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.msg = [dictionary objectForKey:@"msg"];
    return self;
}
 @end
@implementation TagCostAttrOperation
-(id) initWithTagKey:(NSString*) tagKey
      operate:(NSNumber*)operate { 
     self.tagKey = tagKey;               
     self.operate = operate;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tagKey])
    {
        [result setValue:[self tagKey] forKey:@"tagKey"];
    }
    if([self operate])
    {
        [result setValue:[self operate] forKey:@"operate"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagKey = [dictionary objectForKey:@"tagKey"];
    self.operate = [dictionary objectForKey:@"operate"];
    return self;
}
 @end
@implementation CostAttrTagKeyInfo
-(id) initWithTagKey:(NSString*) tagKey
      costAttr:(NSNumber*)costAttr
      tagKeyValid:(NSNumber*)tagKeyValid { 
     self.tagKey = tagKey;               
     self.costAttr = costAttr;               
     self.tagKeyValid = tagKeyValid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tagKey])
    {
        [result setValue:[self tagKey] forKey:@"tagKey"];
    }
    if([self costAttr])
    {
        [result setValue:[self costAttr] forKey:@"costAttr"];
    }
    if([self tagKeyValid])
    {
        [result setValue:[self tagKeyValid] forKey:@"tagKeyValid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagKey = [dictionary objectForKey:@"tagKey"];
    self.costAttr = [dictionary objectForKey:@"costAttr"];
    self.tagKeyValid = [dictionary objectForKey:@"tagKeyValid"];
    return self;
}
 @end
@implementation PageInfo
-(id) initWithCurrentPage:(NSNumber*) currentPage
      pageSize:(NSNumber*)pageSize
      totalRecord:(NSNumber*)totalRecord
      totalPage:(NSNumber*)totalPage { 
     self.currentPage = currentPage;               
     self.pageSize = pageSize;               
     self.totalRecord = totalRecord;               
     self.totalPage = totalPage;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self currentPage])
    {
        [result setValue:[self currentPage] forKey:@"currentPage"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self totalRecord])
    {
        [result setValue:[self totalRecord] forKey:@"totalRecord"];
    }
    if([self totalPage])
    {
        [result setValue:[self totalPage] forKey:@"totalPage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.currentPage = [dictionary objectForKey:@"currentPage"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.totalRecord = [dictionary objectForKey:@"totalRecord"];
    self.totalPage = [dictionary objectForKey:@"totalPage"];
    return self;
}
 @end
@implementation TagValuesResVo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      tagValues:(NSArray<NSString*>*)tagValues { 
     self.pin = pin;               
     self.region = region;               
     self.tagValues = tagValues;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self tagValues])
    {
        [result setValue:[self tagValues] forKey:@"tagValues"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    self.tagValues = [dictionary objectForKey:@"tagValues"];
    return self;
}
 @end
@implementation TagCostAttrOperateInfo
-(id) initWithTagKey:(NSString*) tagKey
      success:(NSNumber*)success
      msg:(NSString*)msg { 
     self.tagKey = tagKey;               
     self.success = success;               
     self.msg = msg;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tagKey])
    {
        [result setValue:[self tagKey] forKey:@"tagKey"];
    }
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    if([self msg])
    {
        [result setValue:[self msg] forKey:@"msg"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagKey = [dictionary objectForKey:@"tagKey"];
    self.success = [dictionary objectForKey:@"success"];
    self.msg = [dictionary objectForKey:@"msg"];
    return self;
}
 @end
@implementation TagKeysResVo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      tagKeys:(NSArray<NSString*>*)tagKeys { 
     self.pin = pin;               
     self.region = region;               
     self.tagKeys = tagKeys;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self tagKeys])
    {
        [result setValue:[self tagKeys] forKey:@"tagKeys"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    self.tagKeys = [dictionary objectForKey:@"tagKeys"];
    return self;
}
 @end
@implementation TagValuesReqVo
-(id) initWithTagFilters:(NSArray<ResourcetagTagFilter*>*) tagFilters { 
     self.tagFilters = tagFilters;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tagFilters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tagFilters] count]; i++) {
            ResourcetagTagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
            ResourcetagTagFilter* item = [[ResourcetagTagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    return self;
}
 @end
@implementation Resource2TagsMap
-(id) initWithResourceId:(NSString*) resourceId
      tags:(NSArray<Tag*>*)tags { 
     self.resourceId = resourceId;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation FrontResourceTagMapping
-(id) initWithJrn:(NSString*) jrn
      resourceId:(NSString*)resourceId
      serviceCode:(NSString*)serviceCode
      tags:(NSArray<Tag*>*)tags
      resourceName:(NSString*)resourceName
      az:(NSString*)az { 
     self.jrn = jrn;               
     self.resourceId = resourceId;               
     self.serviceCode = serviceCode;               
     self.tags = tags;               
     self.resourceName = resourceName;               
     self.az = az;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self jrn])
    {
        [result setValue:[self jrn] forKey:@"jrn"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    if([self resourceName])
    {
        [result setValue:[self resourceName] forKey:@"resourceName"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.jrn = [dictionary objectForKey:@"jrn"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    self.resourceName = [dictionary objectForKey:@"resourceName"];
    self.az = [dictionary objectForKey:@"az"];
    return self;
}
 @end
@implementation TagResourcesResVo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      failedResourcesMap:(NSArray<FailedResourcesMap*>*)failedResourcesMap
      successCount:(NSNumber*)successCount { 
     self.pin = pin;               
     self.region = region;               
     self.failedResourcesMap = failedResourcesMap;               
     self.successCount = successCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self failedResourcesMap])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self failedResourcesMap] count]; i++) {
            FailedResourcesMap* item = [[self failedResourcesMap] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"failedResourcesMap"];
    }
    if([self successCount])
    {
        [result setValue:[self successCount] forKey:@"successCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    NSArray* failedResourcesMapArray = [dictionary objectForKey:@"failedResourcesMap"];
    if(failedResourcesMapArray&&![failedResourcesMapArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [failedResourcesMapArray count];i++)
        {
            FailedResourcesMap* item = [[FailedResourcesMap alloc]initWithDic:[failedResourcesMapArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.failedResourcesMap = propertyArray;
    }
    self.successCount = [dictionary objectForKey:@"successCount"];
    return self;
}
 @end
@implementation TagResourcesReqVo
-(id) initWithResources:(NSArray<ResourcesMap*>*) resources
      tags:(NSArray<Tag*>*)tags { 
     self.resources = resources;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resources])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self resources] count]; i++) {
            ResourcesMap* item = [[self resources] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resources"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* resourcesArray = [dictionary objectForKey:@"resources"];
    if(resourcesArray&&![resourcesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resourcesArray count];i++)
        {
            ResourcesMap* item = [[ResourcesMap alloc]initWithDic:[resourcesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.resources = propertyArray;
    }
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation TagsResVo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      tags:(NSArray<Tag*>*)tags { 
     self.pin = pin;               
     self.region = region;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation FrontResourcesReqVo
-(id) initWithServiceCodes:(NSArray<NSString*>*) serviceCodes
      resourceIds:(NSArray<NSString*>*)resourceIds
      tagFilters:(NSArray<ResourcetagTagFilter*>*)tagFilters
      pageSize:(NSNumber*)pageSize
      currentPage:(NSNumber*)currentPage { 
     self.serviceCodes = serviceCodes;               
     self.resourceIds = resourceIds;               
     self.tagFilters = tagFilters;               
     self.pageSize = pageSize;               
     self.currentPage = currentPage;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCodes])
    {
        [result setValue:[self serviceCodes] forKey:@"serviceCodes"];
    }
    if([self resourceIds])
    {
        [result setValue:[self resourceIds] forKey:@"resourceIds"];
    }
    if([self tagFilters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tagFilters] count]; i++) {
            ResourcetagTagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self currentPage])
    {
        [result setValue:[self currentPage] forKey:@"currentPage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.serviceCodes = [dictionary objectForKey:@"serviceCodes"];
    self.resourceIds = [dictionary objectForKey:@"resourceIds"];
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
            ResourcetagTagFilter* item = [[ResourcetagTagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.currentPage = [dictionary objectForKey:@"currentPage"];
    return self;
}
 @end
@implementation GetCostAttrTagKeysResult
-(id) initWithPin:(NSString*) pin
      costAttrTagKeyInfos:(NSArray<CostAttrTagKeyInfo*>*)costAttrTagKeyInfos
      pageInfo:(PageInfo*)pageInfo { 
     self.pin = pin;               
     self.costAttrTagKeyInfos = costAttrTagKeyInfos;               
     self.pageInfo = pageInfo;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self costAttrTagKeyInfos])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self costAttrTagKeyInfos] count]; i++) {
            CostAttrTagKeyInfo* item = [[self costAttrTagKeyInfos] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"costAttrTagKeyInfos"];
    }
    if([self pageInfo])
    {
        [result setValue:[[self pageInfo] dictionary]forKey:@"pageInfo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    NSArray* costAttrTagKeyInfosArray = [dictionary objectForKey:@"costAttrTagKeyInfos"];
    if(costAttrTagKeyInfosArray&&![costAttrTagKeyInfosArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [costAttrTagKeyInfosArray count];i++)
        {
            CostAttrTagKeyInfo* item = [[CostAttrTagKeyInfo alloc]initWithDic:[costAttrTagKeyInfosArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.costAttrTagKeyInfos = propertyArray;
    }
    self.pageInfo = [[PageInfo alloc]initWithDic:[dictionary objectForKey:@"pageInfo"]];
    return self;
}
 @end
@implementation UnTagResourcesResVo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      failedResourcesMap:(NSArray<FailedResourcesMap*>*)failedResourcesMap
      successCount:(NSNumber*)successCount { 
     self.pin = pin;               
     self.region = region;               
     self.failedResourcesMap = failedResourcesMap;               
     self.successCount = successCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self failedResourcesMap])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self failedResourcesMap] count]; i++) {
            FailedResourcesMap* item = [[self failedResourcesMap] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"failedResourcesMap"];
    }
    if([self successCount])
    {
        [result setValue:[self successCount] forKey:@"successCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    NSArray* failedResourcesMapArray = [dictionary objectForKey:@"failedResourcesMap"];
    if(failedResourcesMapArray&&![failedResourcesMapArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [failedResourcesMapArray count];i++)
        {
            FailedResourcesMap* item = [[FailedResourcesMap alloc]initWithDic:[failedResourcesMapArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.failedResourcesMap = propertyArray;
    }
    self.successCount = [dictionary objectForKey:@"successCount"];
    return self;
}
 @end
@implementation FrontResourcesResult
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      frontResourceTagMapping:(NSArray<FrontResourceTagMapping*>*)frontResourceTagMapping
      pageInfo:(PageInfo*)pageInfo { 
     self.pin = pin;               
     self.region = region;               
     self.frontResourceTagMapping = frontResourceTagMapping;               
     self.pageInfo = pageInfo;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self frontResourceTagMapping])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self frontResourceTagMapping] count]; i++) {
            FrontResourceTagMapping* item = [[self frontResourceTagMapping] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"frontResourceTagMapping"];
    }
    if([self pageInfo])
    {
        [result setValue:[[self pageInfo] dictionary]forKey:@"pageInfo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    NSArray* frontResourceTagMappingArray = [dictionary objectForKey:@"frontResourceTagMapping"];
    if(frontResourceTagMappingArray&&![frontResourceTagMappingArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [frontResourceTagMappingArray count];i++)
        {
            FrontResourceTagMapping* item = [[FrontResourceTagMapping alloc]initWithDic:[frontResourceTagMappingArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.frontResourceTagMapping = propertyArray;
    }
    self.pageInfo = [[PageInfo alloc]initWithDic:[dictionary objectForKey:@"pageInfo"]];
    return self;
}
 @end
@implementation FrontTagsResourcesInfo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      tagsResourcesInfos:(NSArray<TagsResourcesInfo*>*)tagsResourcesInfos
      pageInfo:(PageInfo*)pageInfo { 
     self.pin = pin;               
     self.region = region;               
     self.tagsResourcesInfos = tagsResourcesInfos;               
     self.pageInfo = pageInfo;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self tagsResourcesInfos])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tagsResourcesInfos] count]; i++) {
            TagsResourcesInfo* item = [[self tagsResourcesInfos] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagsResourcesInfos"];
    }
    if([self pageInfo])
    {
        [result setValue:[[self pageInfo] dictionary]forKey:@"pageInfo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    NSArray* tagsResourcesInfosArray = [dictionary objectForKey:@"tagsResourcesInfos"];
    if(tagsResourcesInfosArray&&![tagsResourcesInfosArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsResourcesInfosArray count];i++)
        {
            TagsResourcesInfo* item = [[TagsResourcesInfo alloc]initWithDic:[tagsResourcesInfosArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tagsResourcesInfos = propertyArray;
    }
    self.pageInfo = [[PageInfo alloc]initWithDic:[dictionary objectForKey:@"pageInfo"]];
    return self;
}
 @end
@implementation TagCostAttrOperateResult
-(id) initWithPin:(NSString*) pin
      operateInfos:(NSArray<TagCostAttrOperateInfo*>*)operateInfos { 
     self.pin = pin;               
     self.operateInfos = operateInfos;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self operateInfos])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self operateInfos] count]; i++) {
            TagCostAttrOperateInfo* item = [[self operateInfos] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"operateInfos"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    NSArray* operateInfosArray = [dictionary objectForKey:@"operateInfos"];
    if(operateInfosArray&&![operateInfosArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [operateInfosArray count];i++)
        {
            TagCostAttrOperateInfo* item = [[TagCostAttrOperateInfo alloc]initWithDic:[operateInfosArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.operateInfos = propertyArray;
    }
    return self;
}
 @end
@implementation UnTagResourcesReqVo
-(id) initWithResources:(NSArray<ResourcesMap*>*) resources
      tags:(NSArray<Tag*>*)tags { 
     self.resources = resources;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resources])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self resources] count]; i++) {
            ResourcesMap* item = [[self resources] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resources"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* resourcesArray = [dictionary objectForKey:@"resources"];
    if(resourcesArray&&![resourcesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resourcesArray count];i++)
        {
            ResourcesMap* item = [[ResourcesMap alloc]initWithDic:[resourcesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.resources = propertyArray;
    }
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation TagCostAttrOperateReq
-(id) initWithOperations:(NSArray<TagCostAttrOperation*>*) operations { 
     self.operations = operations;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self operations])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self operations] count]; i++) {
            TagCostAttrOperation* item = [[self operations] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"operations"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* operationsArray = [dictionary objectForKey:@"operations"];
    if(operationsArray&&![operationsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [operationsArray count];i++)
        {
            TagCostAttrOperation* item = [[TagCostAttrOperation alloc]initWithDic:[operationsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.operations = propertyArray;
    }
    return self;
}
 @end
@implementation ResetTagResourcesResVo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      resetTagResourcesInfos:(NSArray<ResetTagResourcesInfo*>*)resetTagResourcesInfos { 
     self.pin = pin;               
     self.region = region;               
     self.resetTagResourcesInfos = resetTagResourcesInfos;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resetTagResourcesInfos])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self resetTagResourcesInfos] count]; i++) {
            ResetTagResourcesInfo* item = [[self resetTagResourcesInfos] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resetTagResourcesInfos"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    NSArray* resetTagResourcesInfosArray = [dictionary objectForKey:@"resetTagResourcesInfos"];
    if(resetTagResourcesInfosArray&&![resetTagResourcesInfosArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resetTagResourcesInfosArray count];i++)
        {
            ResetTagResourcesInfo* item = [[ResetTagResourcesInfo alloc]initWithDic:[resetTagResourcesInfosArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.resetTagResourcesInfos = propertyArray;
    }
    return self;
}
 @end
@implementation ResourceTagMapping
-(id) initWithJrn:(NSString*) jrn
      serviceCode:(NSString*)serviceCode
      resourceId:(NSString*)resourceId
      tags:(NSArray<Tag*>*)tags { 
     self.jrn = jrn;               
     self.serviceCode = serviceCode;               
     self.resourceId = resourceId;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self jrn])
    {
        [result setValue:[self jrn] forKey:@"jrn"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.jrn = [dictionary objectForKey:@"jrn"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation ResourceResVo
-(id) initWithPin:(NSString*) pin
      region:(NSString*)region
      resourceTagMappingList:(NSArray<ResourceTagMapping*>*)resourceTagMappingList { 
     self.pin = pin;               
     self.region = region;               
     self.resourceTagMappingList = resourceTagMappingList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceTagMappingList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self resourceTagMappingList] count]; i++) {
            ResourceTagMapping* item = [[self resourceTagMappingList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resourceTagMappingList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pin = [dictionary objectForKey:@"pin"];
    self.region = [dictionary objectForKey:@"region"];
    NSArray* resourceTagMappingListArray = [dictionary objectForKey:@"resourceTagMappingList"];
    if(resourceTagMappingListArray&&![resourceTagMappingListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resourceTagMappingListArray count];i++)
        {
            ResourceTagMapping* item = [[ResourceTagMapping alloc]initWithDic:[resourceTagMappingListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.resourceTagMappingList = propertyArray;
    }
    return self;
}
 @end
@implementation ResourceReqVo
-(id) initWithServiceCodes:(NSArray<NSString*>*) serviceCodes
      resourceIds:(NSArray<NSString*>*)resourceIds
      tagFilters:(NSArray<ResourcetagTagFilter*>*)tagFilters
      orderCondition:(NSString*)orderCondition
      descOrAsc:(NSString*)descOrAsc
      pageSize:(NSNumber*)pageSize
      currentPage:(NSNumber*)currentPage { 
     self.serviceCodes = serviceCodes;               
     self.resourceIds = resourceIds;               
     self.tagFilters = tagFilters;               
     self.orderCondition = orderCondition;               
     self.descOrAsc = descOrAsc;               
     self.pageSize = pageSize;               
     self.currentPage = currentPage;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCodes])
    {
        [result setValue:[self serviceCodes] forKey:@"serviceCodes"];
    }
    if([self resourceIds])
    {
        [result setValue:[self resourceIds] forKey:@"resourceIds"];
    }
    if([self tagFilters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tagFilters] count]; i++) {
            ResourcetagTagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    if([self orderCondition])
    {
        [result setValue:[self orderCondition] forKey:@"orderCondition"];
    }
    if([self descOrAsc])
    {
        [result setValue:[self descOrAsc] forKey:@"descOrAsc"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self currentPage])
    {
        [result setValue:[self currentPage] forKey:@"currentPage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.serviceCodes = [dictionary objectForKey:@"serviceCodes"];
    self.resourceIds = [dictionary objectForKey:@"resourceIds"];
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
            ResourcetagTagFilter* item = [[ResourcetagTagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    self.orderCondition = [dictionary objectForKey:@"orderCondition"];
    self.descOrAsc = [dictionary objectForKey:@"descOrAsc"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.currentPage = [dictionary objectForKey:@"currentPage"];
    return self;
}
 @end
@implementation QueryResourceReqVo
-(id) initWithServiceCode:(NSString*) serviceCode
      tagFilters:(NSArray<ResourcetagTagFilter*>*)tagFilters
      operatorValue:(NSString*)operatorValue { 
     self.serviceCode = serviceCode;               
     self.tagFilters = tagFilters;               
     self.operatorValue = operatorValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    if([self tagFilters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tagFilters] count]; i++) {
            ResourcetagTagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    if([self operatorValue])
    {
        [result setValue:[self operatorValue] forKey:@"operator"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
            ResourcetagTagFilter* item = [[ResourcetagTagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    self.operatorValue = [dictionary objectForKey:@"operator"];
    return self;
}
 @end
@implementation TagKeysReqVo
-(id) initWithServiceCodes:(NSArray<NSString*>*) serviceCodes
      tagFilters:(NSArray<ResourcetagTagFilter*>*)tagFilters { 
     self.serviceCodes = serviceCodes;               
     self.tagFilters = tagFilters;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCodes])
    {
        [result setValue:[self serviceCodes] forKey:@"serviceCodes"];
    }
    if([self tagFilters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tagFilters] count]; i++) {
            ResourcetagTagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.serviceCodes = [dictionary objectForKey:@"serviceCodes"];
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
            ResourcetagTagFilter* item = [[ResourcetagTagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    return self;
}
 @end
@implementation TagsReqVo
-(id) initWithServiceCodes:(NSArray<NSString*>*) serviceCodes
      kind:(NSString*)kind
      tagFilters:(NSArray<ResourcetagTagFilter*>*)tagFilters { 
     self.serviceCodes = serviceCodes;               
     self.kind = kind;               
     self.tagFilters = tagFilters;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCodes])
    {
        [result setValue:[self serviceCodes] forKey:@"serviceCodes"];
    }
    if([self kind])
    {
        [result setValue:[self kind] forKey:@"kind"];
    }
    if([self tagFilters])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tagFilters] count]; i++) {
            ResourcetagTagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.serviceCodes = [dictionary objectForKey:@"serviceCodes"];
    self.kind = [dictionary objectForKey:@"kind"];
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
            ResourcetagTagFilter* item = [[ResourcetagTagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    return self;
}
 @end
@implementation ResetTagResourcesReqVo
-(id) initWithServiceCodes:(NSArray<NSString*>*) serviceCodes
      resourceTags:(NSArray<Resource2TagsMap*>*)resourceTags { 
     self.serviceCodes = serviceCodes;               
     self.resourceTags = resourceTags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self serviceCodes])
    {
        [result setValue:[self serviceCodes] forKey:@"serviceCodes"];
    }
    if([self resourceTags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self resourceTags] count]; i++) {
            Resource2TagsMap* item = [[self resourceTags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resourceTags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.serviceCodes = [dictionary objectForKey:@"serviceCodes"];
    NSArray* resourceTagsArray = [dictionary objectForKey:@"resourceTags"];
    if(resourceTagsArray&&![resourceTagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resourceTagsArray count];i++)
        {
            Resource2TagsMap* item = [[Resource2TagsMap alloc]initWithDic:[resourceTagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.resourceTags = propertyArray;
    }
    return self;
}
 @end
 
 


